Add the VNC port to the output of xm list --long, if the value has been written
authorEwan Mellor <ewan@xensource.com>
Wed, 15 Nov 2006 09:44:12 +0000 (09:44 +0000)
committerEwan Mellor <ewan@xensource.com>
Wed, 15 Nov 2006 09:44:12 +0000 (09:44 +0000)
to xenstore by QEMU.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomainInfo.py

index 80d18f06cf16c829ea5c226c19fd183ecae10fc4..ab3c79356dd3a215117b2c13a214bddf9d1f1440 100644 (file)
@@ -1659,9 +1659,17 @@ class XendDomainInfo:
         log.trace("XendDomainInfo.update done on domain %s: %s",
                   str(self.domid), self.info)
 
-    def sxpr(self, ignore_devices = False):
-        return self.info.get_sxp(domain = self,
-                                 ignore_devices = ignore_devices)
+    def sxpr(self, ignore_store = False):
+        result = self.info.get_sxp(domain = self,
+                                   ignore_devices = ignore_store)
+
+        if not ignore_store:
+            vnc_port = self._readDom('console/vnc-port')
+            if vnc_port is not None:
+                result.append(['device',
+                               ['console', ['vnc-port', str(vnc_port)]]])
+
+        return result
 
     # Xen API
     # ----------------------------------------------------------------